/**
 * 这里存放的是对token的操作。
 */
import { ajaxTcbCloud } from "@/utils/cloud";
import { successResponseType, failRejectType } from "CustomTypes";

/**
 * 去服务器获取 accessToken
 */
export const getAccessTokenByCloud = (
  data: string
): Promise<successResponseType | failRejectType> =>
  ajaxTcbCloud("/auth/generateAccessToken", { data });

/**
 * 去服务器获取 refreshToken
 */
export const getRefreshTokenByCloud = (
  data: string
): Promise<successResponseType | failRejectType> =>
  ajaxTcbCloud("/auth/generateRefreshToken", { data });
